import Vue from 'vue'
import app from './App.vue'
import router from './route'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import {Header, Swipe, SwipeItem,Button} from 'mint-ui'
import 'mint-ui/lib/style.css'
import './lib/mui/css/mui.css'
import './lib/mui/css/icons-extra.css'
import moment from 'moment'
Vue.use(VueResource);
Vue.use(VueRouter);  //写了这一句代码才可以使用router-link
Vue.filter('dataFormat', function (datastr, pattern = 'YYYY-MM-DD HH:mm:ss') {
	return moment(datastr).format(pattern);
})
//设置请求的根路径
Vue.http.options.root = 'http://www.liulongbin.top:3005';

Vue.component(Header.name, Header);
Vue.component(Swipe.name, Swipe);
Vue.component(SwipeItem.name, SwipeItem);
Vue.component(Button.name,Button);

let vm = new Vue({
	el: '#app',
	render: c => c(app),
	router
})